//
//  CategoryTableViewCell.m
//  Baisibudejie
//
//  Created by yu hu on 2017/3/22.
//  Copyright © 2017年 yu hu. All rights reserved.
//

#import "CategoryTableViewCell.h"
#import "RecommendCategory.h"

@interface CategoryTableViewCell()

@property (weak, nonatomic) IBOutlet UIView *leftView;// 分割线

@end
@implementation CategoryTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    self.backgroundColor = XMGRGBColor(244, 244, 244);
    
}

- (void)setRecommendCategory:(RecommendCategory *)recommendCategory
{
    _recommendCategory = recommendCategory;
    
    self.textLabel.text = recommendCategory.name;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
  
    self.leftView.hidden = !selected;
    
    self.textLabel.textColor = selected ? [UIColor redColor] : [UIColor blackColor];
    
}

@end
